﻿<%@ Page Title="login" Language="C#" MasterPageFile="dao_tao.master" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="App_form_login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 450px; height: 200px; position: fixed; top: 200px; left: 500px; border: 1px  #0094ff solid;">
        <div style="width: inherit; background-image: url(../../Images/Hethong/ngang.png); height: 30px;">
            <image src="../../Images/Hethong/login.png" style="width: 23px; height: 24px; float: left; padding: 2px;"></image>
            <div style="text-align: center; padding: 6px; text-transform: uppercase; font-size: 14px; font-weight: bold;">
                Đăng nhập hệ thống
            </div>
            <div style="padding: 40px 10px 10px 20px;">
                <div style="float: left; width: 22%">
                    <label>Tên đăng nhập :</label>
                </div>
                <div style="width: 75%; float: right; text-align: left;">
                    <Lib:textBox ID="USER" runat="server" Width="300px"  Msg="Tên đăng nhập"></Lib:textBox>
                </div>
                <br />
                <br />
                <div style="float: left; width: 22%">
                    <label>Mật khẩu :</label>
                </div>
                <div style="width: 75%; float: right; text-align: left;">
                    <Lib:textBox ID="PASS" runat="server" Width="300px" TextMode="Password" Msg="pasword"></Lib:textBox>
                </div>
                <br />
                <br />
                <div style="width: 100%; margin-top: 10px; padding-left: 100px;">
                    <Lib:Button runat="server" ID="add" Width="100px" Text="Đăng nhập" onClientClick="login();"></Lib:Button>
                    <Lib:Button runat="server" ID="new" Width="100px" Text="Hủy" onClientClick="reset();"></Lib:Button>
                </div>
            </div>
        </div>
    </div>
    <asp:HiddenField ID="kthuoc" runat="server" Value="0,0" />

    <script type="text/javascript">
        function reset() {
            $("#<%=USER.ClientID%>").val("");
            $("#<%=PASS.ClientID%>").val("");
        }
        function login() {
            try {
                var user = $("#<%=USER.ClientID%>").val(), b_pas = $("#<%=PASS.ClientID%>").val();
                wht_nsd.Fs_LOGIN(user, b_pas, P_LOGIN_KQ, ErrorDb, ErrorTimeOut);
                return false;
            }
            catch (err) {
                Msg.Show("Thông báo", err.message, "error");
            }
        }
        function P_LOGIN_KQ(b_kq) {
            if (CheckError(b_kq)) {
                ShowError(b_kq);
                return;
            }
             window.location.assign("CauHinh.aspx");
        }
    </script>
</asp:Content>


